<?php

require_once(RX_PATH."Database/RXInsert.php");
require_once(RX_PATH."Database/RXUpdate.php");
require_once(RX_PATH."Database/RXDelete.php");

class GenericWriter{

	protected $query;
	protected $connection;	
	protected $object;
	protected $operation;
	
	public function __construct($object = NULL, $connection = NULL){
		$this->connection = $connection;
		$this->object = $object;		
	}
	
	public function setObject($object){
		$this->object = $object;
	}
	
	public function getObject(){
		return $this->object;
	}
	
	public function getQuery(){
		return $this->query;
	}
	
	public function setOperation($operation = NULL){
		$this->operation = $operation;
	}
	
	public function save()		{return FALSE;}
	public function update()	{return FALSE;}
	public function delete()		{return FALSE;}
	
	public function getError(){
		if($this->connection)
			return $this->connection->getError();
		else
			return FALSE;
	}
		
}

?>